package com.cssl.service;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.cssl.pojo.User;

@Service
public class UserServiceImpl {
	// 删除一段大V辅导辅导费
	@Cacheable(value = "user", key = "#id", unless = "#result==null", condition = "#id%2==0")
	public User getUser(int id) {
		System.out.println("UsersService:");
		User u = new User(id, "傻强", "1234", 17);
		return u;
	}

}
